﻿<Window x:Class="CSSAdriverapp.AssignDriver"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Assign Driver" Height="440" Width="828" xmlns:my="clr-namespace:CSSAdriverapp" Icon="/CSSA%20Driver%20App;component/lorry_green_256.ico">
    <Grid Background="#C5AFB1AF" Width="815">
        <DataGrid AutoGenerateColumns="False" Height="200" HorizontalAlignment="Left" Margin="24,22,0,0" Name="activityDataGrid" VerticalAlignment="Top" Width="390" SelectionChanged="activityDataGrid_SelectionChanged" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:AssignDriver, AncestorLevel=1}, Path=activities}" AlternatingRowBackground="#FF96D2FF" SelectionMode="Single" IsReadOnly="True" CanUserAddRows="false" GridLinesVisibility="None">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=activityid}" Header="ID" />
                <DataGridTextColumn Binding="{Binding Path=activity_name}" Header="Name" />
            </DataGrid.Columns>
        </DataGrid>
        <DataGrid AutoGenerateColumns="False" Height="200" HorizontalAlignment="Left" Margin="457,22,0,0" Name="driverDataGrid" VerticalAlignment="Top" Width="200" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:AssignDriver, AncestorLevel=1}, Path=drivers}" AlternatingRowBackground="#FF96D2FF" SelectionMode="Single" IsReadOnly="True" CanUserAddRows="false" GridLinesVisibility="None" SelectionChanged="driverDataGrid_SelectionChanged">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=ID}" Header="ID" />
                <DataGridTextColumn Binding="{Binding Path=first_name}" Header="First" />
                <DataGridTextColumn Binding="{Binding Path=last_name}" Header="Last" />
            </DataGrid.Columns>
        </DataGrid>
        <Button Content="Assign" Height="23" HorizontalAlignment="Left" Margin="675,199,0,0" Name="assignButton" VerticalAlignment="Top" Width="75" Click="assignButton_Click" />
        <Rectangle Height="41" HorizontalAlignment="Left" Margin="24,273,0,0" Name="rectangle1" Stroke="Black" VerticalAlignment="Top" Width="200" Fill="#FF9CB6B3" />
        <Label Content="Assigned Driver" Height="28" HorizontalAlignment="Left" Margin="79,252,0,0" Name="assignedDriverHeaderLabel" VerticalAlignment="Top" />
        <Label Height="41" HorizontalAlignment="Left" Margin="24,273,0,0" Name="assignedDriverLabel" VerticalAlignment="Top" Width="200" FontSize="24" />
        <DataGrid AutoGenerateColumns="False" Height="105" HorizontalAlignment="Left" Margin="459,273,0,0" Name="driverPreferenceDataGrid" VerticalAlignment="Top" Width="200" ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:AssignDriver, AncestorLevel=1}, Path=dpactivity}" IsReadOnly="True" CanUserAddRows="false" GridLinesVisibility="None" AlternatingRowBackground="#FF96D2FF">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=activityid}" Header="ID" />
                <DataGridTextColumn Binding="{Binding Path=activity_name}" Header="Name" />
            </DataGrid.Columns>
        </DataGrid>
        <Label Content="Driver Preferences" Height="28" HorizontalAlignment="Left" Margin="500,248,0,0" Name="driverPreferenceHeaderLabel" VerticalAlignment="Top" />
        <Label Content="Activity" Height="28" HorizontalAlignment="Left" Margin="179,0,0,0" Name="activityHeaderLabel" VerticalAlignment="Top" />
        <Label Content="Driver" Height="28" HorizontalAlignment="Left" Margin="537,0,0,0" Name="driverHeaderLabel" VerticalAlignment="Top" />
    </Grid>
</Window>
